﻿@model Senac.Escola.Projeto.Models.Resposta

@{
    ViewBag.Title = "Create";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    @Html.HiddenFor(a => a.Pergunta.PerguntaID)
    @Html.HiddenFor(a => a.PerguntaID)
    @Html.HiddenFor(a => a.Pergunta.DescricaoPergunta)

    <fieldset>
        <legend>@ViewBag.NomePergunta</legend>

         <div class="editor-label">
            @Html.Label("Resposta")
            @Html.EditorFor(model => model.Descricao)
            @Html.ValidationMessageFor(model => model.Descricao)
        </div>

        <div class="editor-field">
            @Html.Label("Marque se resposta correta")
            @Html.CheckBoxFor(x => x.IsResposta, new { @title = "Resposta correta" })
        </div>
        <br/>
        <br/>
            <div class="row">
                <button type="submit" class="btn btn-primary span2">
                    <i class="icon-user icon-white"></i>Salvar
                </button>
            </div>
    </fieldset>
}




<ul class="pager">
  <li><a href="@Url.Content("~/Resposta/ListarRespostas/" + Model.PerguntaID)">Finalizar</a></li>
</ul>

<script type="text/javascript">

    $(function() {
        $("#Descricao").val("");
    });

</script>